package ioTest;

import java.io.*;

public class Test1 {

	/**
	 * @param args
	 * @throws IOException 
	 */
	public static void main(String[] args) throws IOException {
		
		File src = new File("d:\\t.txt");
		File desc = new File("d:\\desc.txt");
		
		FileInputStream fis = new FileInputStream(src);
		FileOutputStream fos = new FileOutputStream(desc);
		byte[] tmp = new byte[1024];
		int i = fis.read(tmp,0,1024);
		while(i > 0) {
			fos.write(tmp);
			i = fis.read(tmp,0,1024);
		}
		
		fos.close();
		fis.close();
		
		
	}

}
